﻿<%@ Register TagPrefix="WpNs0" Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Reference VirtualPath="~masterurl/custom.master" %>
<%@ Page language="C#"   Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" %>
<%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
	<style type="text/css">
		.ms-pagetitleareaframe table, .ms-titleareaframe
		{
			background: none;
			height: 10px;
			overflow:hidden;
		}
		.ms-pagetitle, .ms-titlearea
		{
			display:none;
		}
	</style>
	<PublishingWebControls:editmodepanel runat="server" id="editmodestyles">
			<!-- Styles for edit mode only-->
			<SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/zz2_editMode.css %>" runat="server"/>
	</PublishingWebControls:editmodepanel>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
	<SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
	<link rel="stylesheet" type="text/css" href="../../Style Library/AMAccelerator/Styles/Base_003.css"/>

	<div class="ms-pagebreadcrumb removeMargins">
		<asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional"/>
	</div>
	<div class="pageImage">
	</div>
	<div class="pageContent">
	</div>
	<div class="topColumnWPZone">
					<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="TopColumnZone" FrameType="TitleBarOnly"
					Title="<%$Resources:cms,WebPartZoneTitle_Top%>" Orientation="Vertical"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
	</div>
	
	<div>
		<div class="leftColumnWPZone">	
						<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="LeftColumnZone" FrameType="TitleBarOnly"
						Title="<%$Resources:cms,WebPartZoneTitle_LeftColumn%>" Orientation="Vertical"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
		</div>	
		<div class="rightColumnWPZone">
						<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="RightColumnZone" FrameType="TitleBarOnly"
						Title="<%$Resources:cms,WebPartZoneTitle_RightColumn%>" Orientation="Vertical"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
		</div>
	</div>
	
	<div>
		<div class="leftLowColumnWPZone">	
						<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="LeftLowColumnZone" FrameType="TitleBarOnly"
						Title="<%$Resources:cms,WebPartZoneTitle_LeftColumn%>" Orientation="Vertical"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
		</div>	
		<div class="rightLowColumnWPZone">
						<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="RightLowColumnZone" FrameType="TitleBarOnly"
						Title="<%$Resources:cms,WebPartZoneTitle_RightColumn%>" Orientation="Vertical"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
		</div>
	</div>
	
	<div class="bottomColumnWPZone">
					<WebPartPages:WebPartZone runat="server" AllowPersonalization="true" ID="BottomColumnZone" FrameType="TitleBarOnly"
					Title="<%$Resources:cms,WebPartZoneTitle_RightColumn%>" Orientation="Vertical"><ZoneTemplate>
					<WpNs0:CoreResultsWebPart runat="server" Description="This web part displays the search results and the properties associated with them." RelevanceView="True" AllowZoneChange="True" ScopeID="1" DisplayRSSLink="True" ViewContentTypeId="" AllowHide="True" ChromeType="None" UseSQLDataSourcePaging="True" HelpMode="Modeless" HighestResultPage="1000" AllowRemove="True" Dir="Default" AllowConnect="True" PageSize="-1" DuplicatesRemoved="True" Title="Search Core Results" DisplayDiscoveredDefinition="True" ID="g_5f903f68_bbef_4371_930a_ef13cc97733f" ShowSearchResults="True" FrameState="Normal" DisplayAlertMeLink="True" FrameType="None" IsVisible="True" DetailLink="" NoiseIgnored="True" IsIncludedFilter="" ConnectionID="00000000-0000-0000-0000-000000000000" ShowActionLinks="True" PartImageSmall="" ExportMode="All" View="Relevance" QueryNumber="Query1" SentencesInSummary="3" HelpLink="" ShowMessages="True" PartOrder="1" DateView="True" DataSourceID="" IsIncluded="True" MissingAssembly="Cannot import this Web Part." PartImageLarge="" ResultsPerPage="10" ShowWithSampleData="False" ExportControlledProperties="True" SuppressWebPartChrome="False" AllowEdit="True" AllowMinimize="True" StemmingEnabled="False" __MarkupType="vsattributemarkup" __WebPartId="{5F903F68-BBEF-4371-930A-EF13CC97733F}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><DataFields>
</DataFields>
<Xsl>



<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ddwrt2="urn:frontpage:internal" >
<xsl:param name="ResultsBy" />
<xsl:param name="ViewByUrl" />
<xsl:param name="ViewByValue" />
<xsl:param name="IsNoKeyword" />
<xsl:param name="IsFixedQuery" />
<xsl:param name="ShowActionLinks" />
<xsl:param name="MoreResultsText" />
<xsl:param name="MoreResultsLink" />
<xsl:param name="CollapsingStatusLink" />
<xsl:param name="CollapseDuplicatesText" />
<xsl:param name="AlertMeLink" />
<xsl:param name="AlertMeText" />
<xsl:param name="SrchRSSText" />
<xsl:param name="SrchRSSLink" />
<xsl:param name="ShowMessage" />
<xsl:param name="IsThisListScope" />
<xsl:param name="DisplayDiscoveredDefinition" select="True" />


<!-- When there is keywory to issue the search -->
<xsl:template name="dvt_1.noKeyword">
  <span class="srch-description">
  <xsl:choose>
  <xsl:when test="$IsFixedQuery">
      Please set the 'Fixed Query' property for the webpart.
  </xsl:when>
   <xsl:otherwise>
      Enter one or more words to search for in the search box.
   </xsl:otherwise>
  </xsl:choose>
  </span>       
</xsl:template>


<!-- When empty result set is returned from search -->
<xsl:template name="dvt_1.empty">
 <div class="srch-sort">
  <xsl:if test="$AlertMeLink and $ShowActionLinks">  
    <span class="srch-alertme" > <a href ="{$AlertMeLink}" id="CSR_AM1" title="{$AlertMeText}"><img style="vertical-align: middle;" src="/_layouts/images/bell.gif" alt="" border="0"/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><xsl:value-of select="$AlertMeText" /></a>
    </span>
  </xsl:if>

  <xsl:if test="string-length($SrchRSSLink) &gt; 0 and $ShowActionLinks">     
   <xsl:if test="$AlertMeLink">  
    |
   </xsl:if>
   <a type="application/rss+xml" href ="{$SrchRSSLink}" title="{$SrchRSSText}" id="SRCHRSSL"><img style="vertical-align: middle;" border="0" src="/_layouts/images/rss.gif" alt=""/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><xsl:value-of select="$SrchRSSText"/></a>
  </xsl:if>
 </div>
 <br/> <br/>

  <span class="srch-description" id="CSR_NO_RESULTS">
   No results matching your search were found.

    <ol>
    <li>Check your spelling. Are the words in your query spelled correctly?</li>
    <li>Try using synonyms. Maybe what you're looking for uses slightly different words.</li>
    <li>Make your search more general. Try more general terms in place of specific ones.</li>
    <li>Try your search in a different scope. Different scopes can have different results.</li>
    </ol>
  </span>
</xsl:template>


<!-- Main body template. Sets the Results view (Relevance or date) options -->
<xsl:template name="dvt_1.body">
  <xsl:variable name="Rows" select="All_Results/Result" />

	<table cellspacing="0" cellpadding="0" class="cbq-layout-main">
		<tr>
			<td colspan="4">
				<table class="am-grid-header" cellspacing="0" cellpadding="0">
	        		<tr> 
	        			<td style="width:5px"><img src="/Style Library/AMAccelerator/Images/mid_round_tab_lh.gif" alt="" /></td>
	        			<td class="am-grid-headerbar" valign="middle">
		        				<table width="100%">
		        					<tr>
		        						<td class="am-grid-headerbaritem am-grid-sort" width="35px" onmouseenter="openSortDropdown(this);" onmouseleave="closeSortDropdown(this);">
		        							Sort 
		        							<img src="/Style Library/AMAccelerator/Images/down_arrow.gif" alt="Sort" />
		        							<div class="am-grid-sortdropdown">
		        								<ul>
		        									<li><a href="javascript:sortGrid('rating');" style="color:white;">Rating</a></li>
		        									<li><a href="javascript:sortGrid('downloads');" style="color:white;">Downloads</a></li>
		        									<li><a href="javascript:sortGrid('comments');" style="color:white;">Comments</a></li>
		        									<li><a href="javascript:sortGrid('title');" style="color:white;">Title</a></li>		
		        									<li><a href="javascript:sortGrid('published');" style="color:white;">Published</a></li>  
		        									<li><a href="javascript:sortGrid('name');" style="color:white;">Name</a></li>
		        									<li><a href="javascript:sortGrid('size');" style="color:white;">Size</a></li>
		        									<li><a href="javascript:sortGrid('duration');" style="color:white;">Duration</a></li>
		           								</ul>
		        							</div>
		        						</td>
		        						<td class="am-grid-headerbaritem" width="170px">
		        							<a style="color:white;" href="/Pages/Download.aspx">Download Your Selection</a>
		        						</td>
		        						<td class="am-grid-headerbaritem">
		        							
		        						</td>
		        						<td align="right" class="am-grid-headerbaritem">
		        							
		        						</td>
		        					</tr>
		        				</table>		        			
		        			</td>
	        			<td style="width:5px"><img src="/Style Library/AMAccelerator/Images/mid_round_tab_rh.gif" alt="" /></td>
	        		</tr>
    			</table>
			</td>
		</tr>
		<tr>
			<xsl:for-each select="$Rows">
			    <xsl:if test="position() mod 4 = 1">
			        <xsl:value-of select="string('&lt;/tr&gt; &lt;tr&gt;')" disable-output-escaping="yes" />
			    </xsl:if>
				<xsl:call-template name="Item" />
			</xsl:for-each>	
			<xsl:if test="count($Rows) mod 4 = 1">
				<td class="am-blankitem"></td><td class="am-blankitem"></td><td class="am-blankitem"></td>
			</xsl:if>
			<xsl:if test="count($Rows) mod 4 = 2">
				<td class="am-blankitem"></td><td class="am-blankitem"></td>
			</xsl:if>
			<xsl:if test="count($Rows) mod 4 = 3">
				<td class="am-blankitem"></td>
			</xsl:if>
		</tr>
		<tr>
			<td colspan="4">
				<table class="am-grid-header" cellspacing="0" cellpadding="0">
	        		<tr>
	        			<td style="width:5px"><img src="/Style Library/AMAccelerator/Images/mid_round_tab_lh.gif" alt="" /></td>
	        			<td class="am-grid-headerbar" style="width:100%; text-align:right;">1 2 3 4 Next&gt;</td>
	        			<td style="width:5px"><img src="/Style Library/AMAccelerator/Images/mid_round_tab_rh.gif" alt="" /></td>
	        		</tr>
	        	</table>
	        </td>
	    </tr>
	</table>	
			  
  <xsl:call-template name="DisplayMoreResultsAnchor" />  
</xsl:template>

<xsl:template name="Item">
	<xsl:variable name="Image">
		<xsl:value-of select="PodcastThumbnail" />
	</xsl:variable>
	<xsl:variable name="Title">
		<xsl:value-of select="title" />
	</xsl:variable>
	<xsl:variable name="SafeLinkUrl">
        <xsl:value-of select="concat(string('/Pages/PodcastDetail.aspx?ID='), id)" />
    </xsl:variable>
    <xsl:variable name="Desc">
    	<xsl:value-of select="test" />
    </xsl:variable>
    
    <td  class="gal_item_wraper" valign="top" style="margin:0px;">
    	<div class="am-griditem">
			<a href="{$SafeLinkUrl}">
				<img src="{$Image}" width="120px" alt="{$Desc}" />
			</a>
		</div>
		<div class="am-griditem-desc">
			<table>
				<tr>
					<td valign="middle" height="40px">
						<a class="am-desclink" href="{$SafeLinkUrl}">
							<xsl:choose>
								<xsl:when test="string-length($Title) &gt; 50">
									<xsl:value-of select="substring($Title, 1, 47)" />
								<xsl:value-of select="'...'" />
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="$Title" />
								</xsl:otherwise>
							</xsl:choose>
						</a>		
					</td>
				</tr>
			</table>
		</div>
		<div>
			<img src="/Style Library/AMAccelerator/Images/star_gray.gif" alt="Rating" />
			<img src="/Style Library/AMAccelerator/Images/star_gray.gif" alt="Rating" />
			<img src="/Style Library/AMAccelerator/Images/star_gray.gif" alt="Rating" />
			<img src="/Style Library/AMAccelerator/Images/star_gray.gif" alt="Rating" />
			<img src="/Style Library/AMAccelerator/Images/star_gray.gif" alt="Rating" />
		</div>
		<div class="am-griditem-user">
			<table>
				<tr>
					<td valign="top" width="40px">
						<xsl:value-of select="string('By ')" /> 
					</td>
					<td valign="top" style="font-size:10px;">
						<xsl:value-of select="PodcastAuthor" />
					</td>
				</tr>
			</table>
		</div>
		<div>
			<div>
				<xsl:value-of select="Format" /> (<xsl:value-of select="Language"/>)
			</div>			
			<div>
				<xsl:value-of select="string('Pub: ')" /> 
				<!--<xsl:call-template name="OuterTemplate.FormatDate">&#xA;					<xsl:with-param name="DateTime" select="PodcastPublishDate" />&#xA;				</xsl:call-template>-->
			</div>
			<div>
				<xsl:value-of select="PodcastDuration" />
			</div>
		</div>
		<div>
			<table width="100%">
				<tr>
					<td style="width:33%;text-align:left">
						<input type="checkbox" />
					</td>
					<td style="width:33%;text-align:left">
						<img src="/Style Library/AMAccelerator/Images/thumb_68.gif" />0
					</td>
					<td style="width:33%;text-align:left">
						<img src="/Style Library/AMAccelerator/Images/thumb_70.gif" />0
					</td>
				</tr>
			</table>
		</div>
    </td>
</xsl:template>

<xsl:template name="HitHighlighting"> 
 <xsl:param name="hh" /> 
 <xsl:apply-templates select="$hh"/> 
</xsl:template>

<xsl:template match="ddd"> 
  &#8230;  
</xsl:template> 
<xsl:template match="c0"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c1"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c2"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c3"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c4"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c5"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c6"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c7"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c8"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 
<xsl:template match="c9"> 
    <b><xsl:value-of select="."/></b>
</xsl:template> 


<!-- The size attribute for each result is prepared here -->
<xsl:template name="DisplaySize">
  <xsl:param name="size" /> 
  <xsl:if test='string-length($size) &gt; 0'>       
   <xsl:if test="number($size) &gt; 0">
   -
    <xsl:choose>
     <xsl:when test="round($size div 1024) &lt; 1"><xsl:value-of select="$size" /> Bytes</xsl:when>
     <xsl:when test="round($size div (1024 *1024)) &lt; 1"><xsl:value-of select="round($size div 1024)" />KB</xsl:when>
     <xsl:otherwise><xsl:value-of select="round($size div (1024 * 1024))"/>MB</xsl:otherwise>
    </xsl:choose>    
   </xsl:if>
  </xsl:if>
</xsl:template>



<!-- A generic template to display string with non 0 string length (used for author and lastmodified time -->
<xsl:template name="DisplayString">
  <xsl:param name="str" />
  <xsl:if test='string-length($str) &gt; 0'>   
   - 
   <xsl:value-of select="$str" /> 
  </xsl:if>
</xsl:template>

<!-- document collapsing link setup -->
<xsl:template name="DisplayCollapsingStatusLink">
    <xsl:param name="status"/>
    <xsl:param name="urlEncoded"/>
    <xsl:param name="id"/>
    <xsl:if test="$CollapsingStatusLink">
      <xsl:choose>
          <xsl:when test="$status=1">
              <br/>
              <xsl:variable name="CollapsingStatusHref" select="concat(substring-before($CollapsingStatusLink, '$$COLLAPSE_PARAM$$'), 'duplicates:&quot;', $urlEncoded, '&quot;', substring-after($CollapsingStatusLink, '$$COLLAPSE_PARAM$$'))"/>
              <span class="srch-dup">
              [<a href="{$CollapsingStatusHref}" id="$id" title="{$CollapseDuplicatesText}">
              <xsl:value-of select="$CollapseDuplicatesText"/>
              </a>]
              </span>
          </xsl:when>
      </xsl:choose>
    </xsl:if>
</xsl:template>
<!-- The "view more results" for fixed query -->
<xsl:template name="DisplayMoreResultsAnchor">
  <xsl:if test="$MoreResultsLink">
   <a href="{$MoreResultsLink}" id="CSR_MRL">
    <xsl:value-of select="$MoreResultsText"/> 
    </a>
   </xsl:if>
</xsl:template>

<xsl:template match="All_Results/DiscoveredDefinitions">
  <xsl:variable name="FoundIn" select="DDFoundIn" />
  <xsl:variable name="DDSearchTerm" select="DDSearchTerm" />
  <xsl:if test="$DisplayDiscoveredDefinition = 'True' and string-length($DDSearchTerm) &gt; 0">
    <script language="javascript">
      function ToggleDefinitionSelection()
      {
        var selection = document.getElementById("definitionSelection");
        if (selection.style.display == "none")
        {
          selection.style.display = "inline";
        }
        else
        {
          selection.style.display = "none";
        }
      }
    </script> <div>
      <a href="#" onclick="ToggleDefinitionSelection(); return false;">
        What people are saying about <b><xsl:value-of select="$DDSearchTerm"/></b></a>
      <div id="definitionSelection" class="srch-Description" style="display:none;">
        <xsl:for-each select="DDefinitions/DDefinition">
          <br/>
          <xsl:variable name="DDUrl" select="DDUrl" />
          <xsl:value-of select="DDStart"/>
          <b>
            <xsl:value-of select="DDBold"/>
          </b>
          <xsl:value-of select="DDEnd"/>
          <br/>
          <xsl:value-of select="$FoundIn"/>
          <a href="{$DDUrl}">
          <xsl:value-of select="DDTitle"/> 
          </a>
        </xsl:for-each>
      </div>
    </div>
  </xsl:if>   
</xsl:template>

<!-- XSL transformation starts here -->
<xsl:template match="/">
  <xsl:if test="$AlertMeLink">  
   <input type="hidden" name="P_Query" />
   <input type="hidden" name="P_LastNotificationTime" />
  </xsl:if>
  <xsl:choose>
   <xsl:when test="$IsNoKeyword = 'True'" >
    <xsl:call-template name="dvt_1.noKeyword" />
   </xsl:when>
   <xsl:when test="$ShowMessage = 'True'">
     <xsl:call-template name="dvt_1.empty" />
   </xsl:when>
   <xsl:otherwise>
    <xsl:call-template name="dvt_1.body"/>      
   </xsl:otherwise>
  </xsl:choose>
</xsl:template> 

<!-- End of Stylesheet -->
</xsl:stylesheet></Xsl>
<SelectColumns>



<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Columns>
        <Column Name="WorkId"/>
        <Column Name="Rank"/>
        <Column Name="Title"/>
        <Column Name="Author"/>
        <Column Name="Size"/>
        <Column Name="Path"/>
        <Column Name="Description"/>
        <Column Name="Write"/>
        <Column Name="SiteName"/>
        <Column Name="CollapsingStatus"/>
        <Column Name="HitHighlightedSummary"/>
        <Column Name="HitHighlightedProperties"/>
        <Column Name="ContentClass"/>
        <Column Name="IsDocument"/>
        <Column Name="PictureThumbnailURL"/>
    </Columns>
    </root>
    </SelectColumns>
<SampleData>
<All_Results>
  <Result>
    <workid>1</workid>
    <rank>222</rank>
    <title>Title of document or web page</title>
    <author>Author of document or web page</author>
    <size>1025</size>
    <sitename>http://www.sample.com</sitename>
    <url>http://www.sample.com/folder/document.aspx</url>
    <imageurl>/_layouts/images/aspx16.gif</imageurl>
    <description>This is the summary of the document or web page. The summary is generated from the original document based on matches with query terms. In some cases, the summary is a description provided by the author.</description>
    <write>December 26, 2004</write>
  </Result>
</All_Results>
</SampleData>
</WpNs0:CoreResultsWebPart>

</ZoneTemplate></WebPartPages:WebPartZone>
	</div>

</asp:Content>
